1 <?php
2 session_start();
3 error_reporting(
0);
4 include(
'includes/config.php');
5 if
(strlen($_SESSION['alogin'])==0)
6     {
7 header(
'location:index.php');
8 }

9 else
{
10     
// code for cancel
11 if
(isset($_REQUEST['eid']))
12     {
13 $eid=intval($_GET[
'eid']);
14 $status=
1;
15
16 $sql =
"UPDATE tblenquiry SET Status=:status WHERE id=:eid";
17 $query = $dbh->prepare($sql);
18 $query -> bindParam(
':status',$status, PDO::PARAM_STR);
19 $query-> bindParam(
':eid',$eid, PDO::PARAM_STR);
20 $query -> execute();
21
22 $msg=
"Enquiry successfully read";
23 }
24
25
26
27
28
29     ?>
30 <!DOCTYPE HTML>
31 <html>
32 <head>
33 <title>TMS | Admin manage Bookings</title>
34 <meta name=
"viewport" content="width=device-width, initial-scale=1">
35 <meta http-equiv=
"Content-Type" content="text/html; charset=utf-8" />
36 <script type=
"application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
37 <link href=
"css/bootstrap.min.css" rel='stylesheet' type='text/css' />
38 <link href=
"css/style.css" rel='stylesheet' type='text/css' />
39 <link rel=
"stylesheet" href="css/morris.css" type="text/css"/>
40 <link href=
"css/font-awesome.css" rel="stylesheet">
41 <script src=
"js/jquery-2.1.4.min.js"></script>
42 <link rel=
"stylesheet" type="text/css" href="css/table-style.css" />
43 <link rel=
"stylesheet" type="text/css" href="css/basictable.css" />
44 <script type=
"text/javascript" src="js/jquery.basictable.min.js"></script>
45 <script type=
"text/javascript">
46     $(document).ready(function() {
47       $(
'#table').basictable();
48
49       $(
'#table-breakpoint').basictable({
50         breakpoint:
768
51       });
52
53       $(
'#table-swap-axis').basictable({
54         swapAxis:
true
55       });
56
57       $(
'#table-force-off').basictable({
58         forceResponsive:
false
59       });
60
61       $(
'#table-no-resize').basictable({
62         noResize:
true
63       });
64
65       $(
'#table-two-axis').basictable();
66
67       $(
'#table-max-height').basictable({
68         tableWrapper:
true
69       });
70     });
71 </script>
72 <link href=
'//fonts.googleapis.com/css?family=Roboto:700,500,300,100italic,100,400' rel='stylesheet' type='text/css'/>
73 <link href=
'//fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
74 <link rel=
"stylesheet" href="css/icon-font.min.css" type='text/css' />
75   <style>
76         .errorWrap {
77     padding: 10px;
78     margin:
0 0 20px 0;
79     background: #fff;
80     border-left: 4px solid #dd3d36;
81     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
82     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
83 }
84 .succWrap{
85     padding: 10px;
86     margin:
0 0 20px 0;
87     background: #fff;
88     border-left: 4px solid #5cb85c;
89     -webkit-box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
90     box-shadow:
0 1px 1px 0 rgba(0,0,0,.1);
91 }
92         </style>
93 </head>
94 <body>
95    <div
class="page-container">
96    <!--/content-inner-->
97 <div
class="left-content">
98        <div
class="mother-grid-inner">
99             <!--header start here-->
100                 <?php include(
'includes/header.php');?>
101                      <div
class="clearfix"> </div>
102                 </div>
103 <!--heder end here-->
104 <ol
class="breadcrumb">
105                 <li
class="breadcrumb-item"><a href="index.html">Home</a><i class="fa fa-angle-right"></i>Manage Enquiries</li>
106             </ol>
107 <div
class="agile-grids">
108                 <!-- tables -->
109                 <?php
if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php }
110                 
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?>
111                 <div
class="agile-tables">
112                     <div
class="w3l-table-info">
113                       <h2>Manage Enquiries</h2>
114                         <table id=
"table">
115                         <thead>
116                           <tr>
117                           <th>Ticket id</th>
118                             <th>Name</th>
119                             <th>Mobile No./ Email</th>
120                             
121                             <th>Subject </th>
122                             <th>Description </th>
123                             <th>Posting date </th>
124                             <th>Action </th>
125                             
126                           </tr>
127                         </thead>
128                         <tbody>
129 <?php $sql =
"SELECT * from tblenquiry";
130 $query = $dbh -> prepare($sql);
131 $query->execute();
132 $results=$query->fetchAll(PDO::FETCH_OBJ);

133
134 if
($query->rowCount() > 0)
135 {

136 foreach
($results as $result)
137 { ?>
138                           <tr>
139                             <td width=
"120">#TCKT-<?php echo htmlentities($result->id);?></td>
140                             <td width=
"50"><?php echo htmlentities($result->FullName);?></td>
141                                 <td width=
"50"><?php echo htmlentities($result->MobileNumber);?> /<br />
142                                 <?php echo $result->EmailId;?></td>
143                             
144                         
145                             <td width=
"200"><?php echo htmlentities($result->Subject);?></a></td>
146                             <td width=
"400"><?php echo htmlentities($result->Description);?></td>
147                             
148                                 <td width=
"50"><?php echo htmlentities($result->PostingDate);?></td>
149                                 <?php
if($result->Status==1)
150 {
151     ?><td>Read</td>
152 <?php }
else {?>
153
154 <td><a href=
"manage-enquires.php?eid=<?php echo htmlentities($result->id);?>" onclick="return confirm('Do you really want to read')" >Pending</a>
155 </td>
156 <?php } ?>
157 </tr>
158                          <?php } }?>
159                         </tbody>
160                       </table>
161                     </div>
162                   </table>
163
164                 
165             </div>
166 <!-- script-
for sticky-nav -->
167         <script>
168         $(document).ready(function() {
169              
var navoffeset=$(".header-main").offset().top;
170              $(window).scroll(function(){
171                 
var scrollpos=$(window).scrollTop();
172                 
if(scrollpos >=navoffeset){
173                     $(
".header-main").addClass("fixed");
174                 }
else{
175                     $(
".header-main").removeClass("fixed");
176                 }
177              });
178              
179         });
180         </script>
181         <!-- /script-
for sticky-nav -->
182 <!--inner block start here-->
183 <div
class="inner-block">
184
185 </div>
186 <!--inner block end here-->
187 <!--copy rights start here-->
188 <?php include(
'includes/footer.php');?>
189 <!--COPY rights end here-->
190 </div>
191 </div>
192   <!--
//content-inner-->
193         <!--/sidebar-menu-->
194                         <?php include(
'includes/sidebarmenu.php');?>
195                               <div
class="clearfix"></div>
196                             </div>
197                             <script>
198                             
var toggle = true;
199                                         
200                             $(
".sidebar-icon").click(function() {
201                               
if (toggle)
202                               {
203                                 $(
".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
204                                 $(
"#menu span").css({"position":"absolute"});
205                               }
206                               
else
207                               {
208                                 $(
".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
209                                 setTimeout(function() {
210                                   $(
"#menu span").css({"position":"relative"});
211                                 },
400);
212                               }
213                                             
214                                             toggle = !toggle;
215                                         });
216                             </script>
217 <!--js -->
218 <script src=
"js/jquery.nicescroll.js"></script>
219 <script src=
"js/scripts.js"></script>
220 <!-- Bootstrap Core JavaScript -->
221    <script src=
"js/bootstrap.min.js"></script>
222    <!-- /Bootstrap Core JavaScript -->
223
224 </body>
225 </html>
226 <?php } ?>


Gõ tìm kiếm nhanh...